Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing authoring on widget pin, allow for a secondary widget #4676

Merged
merged 7 commits into from
Nov 11, 2024

Conversation

thecalcc
Copy link
Contributor

@thecalcc thecalcc commented Oct 28, 2024

SDESK-7343
SDESK-7344

@thecalcc
Copy link
Contributor Author

@tomaskikutis could you check the code

@tomaskikutis
Copy link
Member

yep, it's on my list

Copy link
Member

@tomaskikutis tomaskikutis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we talked about before - I'm thinking whether I didn't previously request the opposite. I think it'd be better to have this behavior as a part of authoring-react component so if it's used somewhere else it would work out of the box without having to re-implement it via a wrapper.

@@ -216,7 +216,7 @@ class CommentsWidget<T> extends React.PureComponent<IProps<T>, IState> {
text="post"
type="primary"
onClick={this.save}
disabled={this.state.newCommentMessage.length < 1}
disabled={this.state.newCommentMessage?.length < 1}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't compare undefined to a number. Stricter compiler options wouldn't allow it.

@@ -114,11 +114,11 @@ export class VersionsTab extends React.PureComponent<IArticleSideWidgetComponent

compareAuthoringEntities({
item1: {
label: gettext('version {{n}}', {n: from._current_version}),
label: gettext('version {{n}}', {n: from?._current_version}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't output a string with pieces missing to the UI - which would happen since you use optional chaining without a fallback.

Current version is mandatory, not sure why are you applying optional chaining all over the place here.

@thecalcc thecalcc merged commit 3c8a335 into superdesk:develop Nov 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants